<%@ page import="cn.myschool.entity.Student" %>
<%@ page import="cn.myschool.severs.StudentServer" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/7/2
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%!
    String what=null;
%>
<html>
<head>
    <title>学生信息</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    String name = request.getParameter("name");
    String id = request.getParameter("gradeId");
    Student stu = new Student();
    stu.setSname(name);
    stu.setGradeid(Integer.valueOf(id));
    int a= StudentServer.ME.add2(stu);
    if (a>0){
        what="操作成功";
    }else {
        what="操作失败";
    }

%>
<p>
    结果：<%=what%>
</p>
<p>
    名称：<%=name%><br>年级id：<%=id%>
</p>
</body>
</html>
